Fracturing fluid is often injected into subterranean reservoirs to hydraulically fracture the reservoir rock. In some instances, the hydraulic fracturing treatment includes an acid stage. During the acid stage, a solution of several thousand gallons of water mixed with a dilute acid (e.g., hydrochloric, muriatic acid, or other acid) is used to clear cement debris in the wellbore and provide an open conduit for hydrocarbons by dissolving carbonate minerals and opening fractures near the wellbore. Diverting agents can be used to divert acid from high permeable zones to damaged or low permeable zones to ensure homogeneous fracturing treatment.